<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-08-15 15:45:30
 * @LastEditTime: 2019-08-15 15:46:19
 * @LastEditors: Please set LastEditors
 -->

<f:layout name="Default" />

This Template is responsible for creating a table of domain objects.

If you modify this template, do not forget to change the overwrite settings
in /Configuration/ExtensionBuilder/settings.yaml:
  Resources:
    Private:
      Templates:
        List.html: keep

Otherwise your changes will be overwritten the next time you save the extension in the extension builder



<f:section name="content">
<f:flashMessages />
    <div class="portlet light ">
        <div class="portlet-title">
            <div class="caption">
                <f:link.action action="new" class="btn btn-info">增加</f:link.action>
            </div>
            <div class="actions">
                <div class="btn-group btn-group-devided">
                    <f:form action="listback" name="search" class="form-inline" method="GET">
                        <div class="input-group">
                            <div class="input-icon">
                                <input type="hidden" name="id" value="{pageUid}" />
                                <i class="fa fa-search"></i>
                                <f:form.textfield name="keyword" value="{keyword}" class="form-control" placeholder="请输入查询条件"/>
                            </div>
                            <span class="input-group-btn">
                                <f:form.submit class="btn btn-success" value="搜" />
                            </span>
                        </div>
                    </f:form>
                </div>
            </div>
        </div>
        <f:widget.paginate objects="{teams}" as="teamsPagination"  configuration="{settings.paginate}">
        <div class="portlet-body">
            <div class="table-scrollable">
                <table class="table table-hover table-light">
                    <thead>
                        <tr class="uppercase">
                            <th></th>
                            <th>序号</th>
                            <th>姓名</th>
                            <th>简介 </th >
                            <th>详情 </th >
                            <th>排序 </th >
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <f:for each="{teamsPagination}" as="team" iteration="itemIteration1">
                        <tr>
                            <td>
                                <label class="mt-checkbox mt-checkbox-outline">
                                    <input type="checkbox" value="{team.uid}" name="test" class="normal sel" />
                                    <span></span>
                                </label>
                            </td>
                        	<td>
                                {f:cObject(typoscriptObjectPath:'lib.calc', data:'{itemIteration1.cycle}+({page}-1)*{settings.paginate.itemsPerPage}')}
                            </td>
                            <td><f:link.action action="show" arguments="{team : team}" >{team.name}</f:link.action></td>
                            <td>{team.intro -> f:format.stripTags()->f:format.crop(maxCharacters: '20', respectWordBoundaries:'0')}</td>
                            <td>{team.detail -> f:format.stripTags()->f:format.crop(maxCharacters: '60', respectWordBoundaries:'0')}</td>
                            <td>{team.orders}</td>
                            <td>
                                <!-- <f:link.action action="edit" additionalParams="{old_trans_id:team.uid,lang:'1',pageid:94}" controller="Trans"
                                    extensionName="translation" pluginName="pi1" pageUid="128" noCache="1" noCacheHash="1"
                                    class="btn btn-success btn-xs">翻译</f:link.action> -->
                                <f:link.action action="edit" arguments="{team : team}" class="btn btn-info btn-xs edit">编辑</f:link.action>
                                <f:link.action action="delete" arguments="{team : team}" class="btn btn-danger btn-xs delete btn-del">删除</f:link.action>
                            </td>
                        </tr>
                        </f:for>
                        <tr>
                            <td>
                                <label class="mt-checkbox mt-checkbox-outline">
                                    <input type="checkbox" name="test" class="normal selectall" />
                                    <span></span>
                                </label>
                            </td>
                            <td colspan="7">
                                <f:form action="multidelete" name="datas">
                                    <f:form.hidden id="multidelete-items" property="items" value=""/>
                                    <f:form.submit value="删除选中" class="btn btn-danger btn-xs delete btn-del btn-delete-all"/>
                                </f:form>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        </f:widget.paginate>
    </div>
<script type="text/javascript" src="{f:uri.resource(path:'JavaScript/common.js')}"></script>
</f:section>
